package demo1;

public class Test {
    public static void main2(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.display();
//        mySingleList.remove(4);
//        mySingleList.addLast(1);
        mySingleList.removeAllKey(1);
        mySingleList.addIndex(1,2);
        System.out.println(mySingleList.contains(2));
        mySingleList.display();
    }
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.display();
        mySingleList.clear();
        mySingleList.addFirst(1111);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addIndex(2,222);
        mySingleList.addLast(1);
        mySingleList.addFirst(1);
        mySingleList.addFirst(1);
        mySingleList.addLast(1);
        mySingleList.addLast(1);
//        mySingleList.addLast();
        mySingleList.display();
//        System.out.println(mySingleList.size());
        mySingleList.addLast(1);
        mySingleList.removeAllKey(1);
        mySingleList.display();
    }
}
